<?php include_once('modules/mod-nkeditor.php'); ?>


<div class="log">



<div class="log-list-box">

    <?
    for($i=0;$i<count($contact_log);$i++){ ?>

    <ul class="layui-timeline" >
        <li class="layui-timeline-item" id="item<? echo $contact_log[$i]['nid']; ?>">
            <i class="layui-icon layui-timeline-axis"></i>
            <div class="layui-timeline-content layui-text">
                <h3 class="layui-timeline-title"><? echo $contact_log[$i]['date']; ?></h3>
                <div class="loglist" ">

                    <div >
                        <i class="fa fa-user" aria-hidden="true"></i>
                        <? echo $employee_list_1d_array[$contact_log[$i]['excutor']]; ?>
                        |  <? echo $contact_log[$i]['contact_way']; ?>
                        <i class="fa fa-exchange" aria-hidden="true"></i>
                        <? echo $data['member']['name']; ?>

                        <? if(
                                $now_employee['smtp_account'] &&
                                $now_employee['smtp_password'] &&
                                $now_employee['smtp_host'] &&
                                $now_employee['smtp_port'] or 1
                              )
                        {?>
                        <span class="mail-reply layui-btn layui-btn-xs" onclick="call_send_mail()" > <i class="fa fa-mail-reply" ></i> 邮件回复</span>
                            <?;}?>


                        <? //如果是这个客户的跟进业务，或者是管理员
                        if(
                            ($data['member']['agentnid'] == $_SESSION['nid']) or
                            ($data['member']['agentnid'] == "") or
                            in_array("admin",$quanxian)
                        )
                        {
                            ?>
                            <span class="del-contact-log layui-btn layui-btn-primary layui-btn-xs"
                                  onclick="del_contact_log(<? echo $contact_log[$i]['nid']; ?>)" >
                                <i class="fa  fa-trash" /></i> 删除记录</span>
                            <?
                        }
                        ?>





                    </div>

                    <div class="content">联系内容：<br/><? echo $contact_log[$i]['content']; ?></div>

                    <?if($contact_log[$i]['content_translate']){?>
                    <div class="content_translate">内容翻译：<? echo $contact_log[$i]['content_translate']; ?></div>
                    <?;}?>
                </div>
            </div>
        </li>
    </ul>



    <? } ?>
</div>






    <div class="log-add-box">

        <? if(
            !$now_employee['smtp_account'] &&
            !$now_employee['smtp_password'] &&
            !$now_employee['smtp_host'] &&
            !$now_employee['smtp_port']
        )
        {?>
            <blockquote class="layui-elem-quote" style="margin-left: 70px;">
                如需要在本页面内回复客户邮件，请向管理员申请配置当前用户邮箱。</a>
            </blockquote>

<!--        <a href="../../employee/view/detail-statistic.php?sys_part=employee&nid=--><?//echo $now_employee['nid']?><!--&tag=setting"-->
<!--           style="color: #1b6d85"-->
<!--           target="_blank">-->

            <?;}?>


        <div class="layui-form-item">
            <label class="layui-form-label">主题</label>
            <div class="layui-input-block">
                <input type="text" name="member_log_title" autocomplete="off" class="layui-input" value="定期跟踪 <? echo date("Y-m-d")?>">
            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">渠道</label>


            <div class="layui-input-block">

                <? foreach ($contact_way_array as $k => $v){?>
                    <input type="radio" name="member_log_contact_way[]"  value="<?echo $v?>" title="<?echo $v?>" >
                    <?;}?>
                <div class="notice">渠道不够用？可以在<a href="plate-edit.php?sys_part=member">【板块设置】</a>中设置</div>
            </div>


        </div>



        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">内容</label>
            <div class="layui-input-block">
                <textarea name="member_log_content" style="width: 490px" ><? echo $detail['remark'] ?></textarea>
                <div class="notice">*本编辑框不能直接用于回复邮件</div>
            </div>
        </div>

    </div>




</div>

<script src="../asset/js/del-contact-log.js"></script>
